HARBOR_SERVER_URL=192.168.3.180/myimg/

CALICO_CNI_IMAGE=docker.io_calico_cni_v3.22.1-amd64.tar.gz
CALICO_KUBE_CONTROLLERS=docker.io_calico_kube-controllers_v3.22.1-amd64.tar.gz
CALICO_NODE=docker.io_calico_node_v3.22.1-amd64.tar.gz
CALICO_POD2DAEMON=docker.io_calico_pod2daemon-flexvol_v3.22.1-amd64.tar.gz

COREDNS_IMAGE=coredns_coredns_latest-amd64.tar.gz

docker load -i $CALICO_CNI_IMAGE
docker load -i $CALICO_KUBE_CONTROLLERS
docker load -i $CALICO_NODE
docker load -i $CALICO_POD2DAEMON
docker load -i $COREDNS_IMAGE

docker images | grep ^calico | awk '{print "docker tag "$1":"$2" ""'$HARBOR_SERVER_URL'"$1":"$2}' | bash
docker images | grep ^coredns | awk '{print "docker tag "$1":"$2" ""'$HARBOR_SERVER_URL'"$1":"$2}' | bash

docker images | grep ^$HARBOR_SERVER_URL | awk '{print "docker push "$1":"$2}' | bash

